<?php

namespace App\Models;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class OrderAuditLog
 * *
 * @property $id  自增ID
 * @property $type  类型 1、场馆预约 2、活动预约 3、志愿服务
 * @property $res_id  关联相关id
 * @property $audit_user_id  预约人id
 * @property $status  状态: 0已点 1显示
 * @property $audit_status  审核后状态 0:待审核 1:已审核 2:拒绝 3:取消
 * @property $audit_admin_uid  审核人uid
 * @property $created_at
 * @property $updated_at
 * @property $deleted_at
 *
 * @package  App\Models
 * @mixin \Illuminate\Database\Eloquent\Builder
 */
class OrderAuditLog extends Model
{
    use SoftDeletes;

    protected $table = 'order_audit_logs';

    protected $fillable = ['id', 'type', 'res_id', 'audit_user_id', 'status', 'audit_status', 'audit_admin_uid'];

    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
    }
}
